home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / misc / gfront11.lha / GUIFront / Demos / LocalizeTest / strings.h < prev    next >
C/C++ Source or Header  |  1994-06-22  |  7KB  |  274 lines

  1. #ifndef STRINGS_H
  2. #define STRINGS_H
  3.  
  4.  
  5. /****************************************************************************/
  6.  
  7.  
  8. /* This file was created automatically by CatComp.
  9.  * Do NOT edit by hand!
  10.  */
  11.  
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifdef CATCOMP_ARRAY
  18. #undef CATCOMP_NUMBERS
  19. #undef CATCOMP_STRINGS
  20. #define CATCOMP_NUMBERS
  21. #define CATCOMP_STRINGS
  22. #endif
  23.  
  24. #ifdef CATCOMP_BLOCK
  25. #undef CATCOMP_STRINGS
  26. #define CATCOMP_STRINGS
  27. #endif
  28.  
  29.  
  30. /****************************************************************************/
  31.  
  32.  
  33. #ifdef CATCOMP_NUMBERS
  34.  
  35. #define MSG_WindowTitle 100
  36. #define MSG_CantCreateGUI 101
  37. #define MSG_CantCreateApplication 102
  38. #define MSG_Above 200
  39. #define MSG_Centered 201
  40. #define MSG_Left 202
  41. #define MSG_Center 203
  42. #define MSG_Right 204
  43. #define MSG_ScreenFont 205
  44. #define MSG_Font 206
  45. #define MSG_Color 207
  46. #define MSG_Bold 208
  47. #define MSG_Italics 209
  48. #define MSG_3D 210
  49. #define MSG_Alignment 211
  50. #define MSG_Attributes 212
  51. #define MSG_Centering 213
  52. #define MSG_Project 214
  53. #define MSG_Open 215
  54. #define MSG_SaveAs 216
  55. #define MSG_About 217
  56. #define MSG_Quit 218
  57. #define MSG_Edit 219
  58. #define MSG_ResetToDefaults 220
  59. #define MSG_ThisEntry 221
  60. #define MSG_AllEntries 222
  61. #define MSG_LastSaved 223
  62. #define MSG_Restore 224
  63. #define MSG_Options 225
  64. #define MSG_CreateIcons 226
  65.  
  66. #endif /* CATCOMP_NUMBERS */
  67.  
  68.  
  69. /****************************************************************************/
  70.  
  71.  
  72. #ifdef CATCOMP_STRINGS
  73.  
  74. #define MSG_WindowTitle_STR "Frame Preferences"
  75. #define MSG_CantCreateGUI_STR "Unable to create GUI"
  76. #define MSG_CantCreateApplication_STR "Unable to create GUIFront application"
  77. #define MSG_Above_STR "_Above"
  78. #define MSG_Centered_STR "C_entered"
  79. #define MSG_Left_STR "_Left"
  80. #define MSG_Center_STR "_Center"
  81. #define MSG_Right_STR "_Right"
  82. #define MSG_ScreenFont_STR "_Screen Font"
  83. #define MSG_Font_STR "_Font"
  84. #define MSG_Color_STR "C_olor"
  85. #define MSG_Bold_STR "_Bold"
  86. #define MSG_Italics_STR "_Italics"
  87. #define MSG_3D_STR "_3D"
  88. #define MSG_Alignment_STR "Alignment"
  89. #define MSG_Attributes_STR "Attributes"
  90. #define MSG_Centering_STR "Centering"
  91. #define MSG_Project_STR "Project"
  92. #define MSG_Open_STR "OOpen..."
  93. #define MSG_SaveAs_STR "ASave As..."
  94. #define MSG_About_STR "?About..."
  95. #define MSG_Quit_STR "QQuit"
  96. #define MSG_Edit_STR "Edit"
  97. #define MSG_ResetToDefaults_STR "Reset to Defaults"
  98. #define MSG_ThisEntry_STR "EThis Entry"
  99. #define MSG_AllEntries_STR "AAll Entries"
  100. #define MSG_LastSaved_STR "LLast Saved"
  101. #define MSG_Restore_STR "RRestore"
  102. #define MSG_Options_STR "Options"
  103. #define MSG_CreateIcons_STR "ICreate Icons?"
  104.  
  105. #endif /* CATCOMP_STRINGS */
  106.  
  107.  
  108. /****************************************************************************/
  109.  
  110.  
  111. #ifdef CATCOMP_ARRAY
  112.  
  113. struct CatCompArrayType
  114. {
  115.     LONG   cca_ID;
  116.     STRPTR cca_Str;
  117. };
  118.  
  119. static const struct CatCompArrayType CatCompArray[] =
  120. {
  121.     {MSG_WindowTitle,(STRPTR)MSG_WindowTitle_STR},
  122.     {MSG_CantCreateGUI,(STRPTR)MSG_CantCreateGUI_STR},
  123.     {MSG_CantCreateApplication,(STRPTR)MSG_CantCreateApplication_STR},
  124.     {MSG_Above,(STRPTR)MSG_Above_STR},
  125.     {MSG_Centered,(STRPTR)MSG_Centered_STR},
  126.     {MSG_Left,(STRPTR)MSG_Left_STR},
  127.     {MSG_Center,(STRPTR)MSG_Center_STR},
  128.     {MSG_Right,(STRPTR)MSG_Right_STR},
  129.     {MSG_ScreenFont,(STRPTR)MSG_ScreenFont_STR},
  130.     {MSG_Font,(STRPTR)MSG_Font_STR},
  131.     {MSG_Color,(STRPTR)MSG_Color_STR},
  132.     {MSG_Bold,(STRPTR)MSG_Bold_STR},
  133.     {MSG_Italics,(STRPTR)MSG_Italics_STR},
  134.     {MSG_3D,(STRPTR)MSG_3D_STR},
  135.     {MSG_Alignment,(STRPTR)MSG_Alignment_STR},
  136.     {MSG_Attributes,(STRPTR)MSG_Attributes_STR},
  137.     {MSG_Centering,(STRPTR)MSG_Centering_STR},
  138.     {MSG_Project,(STRPTR)MSG_Project_STR},
  139.     {MSG_Open,(STRPTR)MSG_Open_STR},
  140.     {MSG_SaveAs,(STRPTR)MSG_SaveAs_STR},
  141.     {MSG_About,(STRPTR)MSG_About_STR},
  142.     {MSG_Quit,(STRPTR)MSG_Quit_STR},
  143.     {MSG_Edit,(STRPTR)MSG_Edit_STR},
  144.     {MSG_ResetToDefaults,(STRPTR)MSG_ResetToDefaults_STR},
  145.     {MSG_ThisEntry,(STRPTR)MSG_ThisEntry_STR},
  146.     {MSG_AllEntries,(STRPTR)MSG_AllEntries_STR},
  147.     {MSG_LastSaved,(STRPTR)MSG_LastSaved_STR},
  148.     {MSG_Restore,(STRPTR)MSG_Restore_STR},
  149.     {MSG_Options,(STRPTR)MSG_Options_STR},
  150.     {MSG_CreateIcons,(STRPTR)MSG_CreateIcons_STR},
  151. };
  152.  
  153. #endif /* CATCOMP_ARRAY */
  154.  
  155.  
  156. /****************************************************************************/
  157.  
  158.  
  159. #ifdef CATCOMP_BLOCK
  160.  
  161. static const char CatCompBlock[] =
  162. {
  163.     "\x00\x00\x00\x64\x00\x12"
  164.     MSG_WindowTitle_STR "\x00"
  165.     "\x00\x00\x00\x65\x00\x16"
  166.     MSG_CantCreateGUI_STR "\x00\x00"
  167.     "\x00\x00\x00\x66\x00\x26"
  168.     MSG_CantCreateApplication_STR "\x00"
  169.     "\x00\x00\x00\xC8\x00\x08"
  170.     MSG_Above_STR "\x00\x00"
  171.     "\x00\x00\x00\xC9\x00\x0A"
  172.     MSG_Centered_STR "\x00"
  173.     "\x00\x00\x00\xCA\x00\x06"
  174.     MSG_Left_STR "\x00"
  175.     "\x00\x00\x00\xCB\x00\x08"
  176.     MSG_Center_STR "\x00"
  177.     "\x00\x00\x00\xCC\x00\x08"
  178.     MSG_Right_STR "\x00\x00"
  179.     "\x00\x00\x00\xCD\x00\x0E"
  180.     MSG_ScreenFont_STR "\x00\x00"
  181.     "\x00\x00\x00\xCE\x00\x06"
  182.     MSG_Font_STR "\x00"
  183.     "\x00\x00\x00\xCF\x00\x08"
  184.     MSG_Color_STR "\x00\x00"
  185.     "\x00\x00\x00\xD0\x00\x06"
  186.     MSG_Bold_STR "\x00"
  187.     "\x00\x00\x00\xD1\x00\x0A"
  188.     MSG_Italics_STR "\x00\x00"
  189.     "\x00\x00\x00\xD2\x00\x04"
  190.     MSG_3D_STR "\x00"
  191.     "\x00\x00\x00\xD3\x00\x0A"
  192.     MSG_Alignment_STR "\x00"
  193.     "\x00\x00\x00\xD4\x00\x0C"
  194.     MSG_Attributes_STR "\x00\x00"
  195.     "\x00\x00\x00\xD5\x00\x0A"
  196.     MSG_Centering_STR "\x00"
  197.     "\x00\x00\x00\xD6\x00\x08"
  198.     MSG_Project_STR "\x00"
  199.     "\x00\x00\x00\xD7\x00\x0A"
  200.     MSG_Open_STR "\x00\x00"
  201.     "\x00\x00\x00\xD8\x00\x0C"
  202.     MSG_SaveAs_STR "\x00"
  203.     "\x00\x00\x00\xD9\x00\x0A"
  204.     MSG_About_STR "\x00"
  205.     "\x00\x00\x00\xDA\x00\x06"
  206.     MSG_Quit_STR "\x00"
  207.     "\x00\x00\x00\xDB\x00\x06"
  208.     MSG_Edit_STR "\x00\x00"
  209.     "\x00\x00\x00\xDC\x00\x12"
  210.     MSG_ResetToDefaults_STR "\x00"
  211.     "\x00\x00\x00\xDD\x00\x0C"
  212.     MSG_ThisEntry_STR "\x00"
  213.     "\x00\x00\x00\xDE\x00\x0E"
  214.     MSG_AllEntries_STR "\x00\x00"
  215.     "\x00\x00\x00\xDF\x00\x0C"
  216.     MSG_LastSaved_STR "\x00"
  217.     "\x00\x00\x00\xE0\x00\x0A"
  218.     MSG_Restore_STR "\x00\x00"
  219.     "\x00\x00\x00\xE1\x00\x08"
  220.     MSG_Options_STR "\x00"
  221.     "\x00\x00\x00\xE2\x00\x10"
  222.     MSG_CreateIcons_STR "\x00\x00"
  223. };
  224.  
  225. #endif /* CATCOMP_BLOCK */
  226.  
  227.  
  228. /****************************************************************************/
  229.  
  230.  
  231. struct LocaleInfo
  232. {
  233.     APTR li_LocaleBase;
  234.     APTR li_Catalog;
  235. };
  236.  
  237.  
  238. #ifdef CATCOMP_CODE
  239.  
  240. STRPTR GetString(struct LocaleInfo *li, LONG stringNum)
  241. {
  242. LONG   *l;
  243. UWORD  *w;
  244. STRPTR  builtIn;
  245.  
  246.     l = (LONG *)CatCompBlock;
  247.  
  248.     while (*l != stringNum)
  249.     {
  250.         w = (UWORD *)((ULONG)l + 4);
  251.         l = (LONG *)((ULONG)l + (ULONG)*w + 6);
  252.     }
  253.     builtIn = (STRPTR)((ULONG)l + 6);
  254.  
  255. #define XLocaleBase LocaleBase
  256. #define LocaleBase li->li_LocaleBase
  257.     
  258.     if (LocaleBase)
  259.         return(GetCatalogStr(li->li_Catalog,stringNum,builtIn));
  260. #define LocaleBase XLocaleBase
  261. #undef XLocaleBase
  262.  
  263.     return(builtIn);
  264. }
  265.  
  266.  
  267. #endif /* CATCOMP_CODE */
  268.  
  269.  
  270. /****************************************************************************/
  271.  
  272.  
  273. #endif /* STRINGS_H */
  274.